package com.itheima.controller;

import com.itheima.dto.AdminDto;
import com.itheima.service.AdminService;
import com.itheima.vo.AdminVo;
import com.itheima.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author :wujunjie
 * createTime :2023-01-03 20:51
 * description :
 */
@RestController
@RequestMapping("/login")
public class AdminController {
    @Autowired
    private AdminService adminService;

    @PostMapping("in")
    public Result login(@RequestBody AdminDto adminDto){
        AdminVo adminVo=adminService.login(adminDto);
        return Result.success(adminVo);
    }
}
